#ifndef SYNC_COUNTER_INIT_H
#define SYNC_COUNTER_INIT_H

#include <linux/module.h>
#include <linux/list.h>

#define BLOCK_NAME_LEN 16

struct init_block;

typedef int(*init_fn_t)(struct init_block *block);
typedef void(*cleanup_fn_t)(struct init_block *block);
typedef void(*drop_fn_t)(struct init_block *block);

struct init_block {
    struct list_head list;
    char name[BLOCK_NAME_LEN];
    init_fn_t init_fn;
    cleanup_fn_t cleanup_fn;
    drop_fn_t drop_fn;
};

void setup_init(void);

int try_init(struct init_block *block);

void cleanup(void);

#endif
